package com.wusuowei.shiro_jwt.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wusuowei.shiro_jwt.model.po.Category;
import com.wusuowei.shiro_jwt.model.po.Product;
import com.wusuowei.shiro_jwt.service.ProductService;
import com.wusuowei.shiro_jwt.service.impl.CategoryServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/test")
public class TestController {

    @Autowired
    private CategoryServiceImpl categoryService;

//    @GetMapping("/categories")
//    public List<Category> getAllCategories() {
//        return categoryService.getAllCategories();
//    }
    @Autowired
    private ProductService productService;
//    @GetMapping("/products")
//    public List<Product> getAllProduct() {
//        Page<Product> page = productService.findPage(new Page<>(1, 5), "", "");
//        List<Product> records = page.getRecords();
//        return records;
//    }



}

